home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gui / textfield.lha / TextField / Source / TextFieldAuto.c < prev   
Encoding:
C/C++ Source or Header  |  1994-06-27  |  661 b   |  33 lines

  1. /*
  2.  * TextField autoinit and autoterminate functions
  3.  * for SAS/C 6.50 and up.
  4.  *
  5.  * If you just compile and link this into your app
  6.  * then TextFieldBase will automatically get setup
  7.  * before main() is called.  All your app source has
  8.  * to include in order to call TEXTFIELD_GetClass() is the
  9.  * <proto/textfield.h> file.
  10.  */
  11.  
  12. #include <exec/types.h>
  13.  
  14. #include <proto/exec.h>
  15.  
  16. struct Library *TextFieldBase;
  17.  
  18. int _STI_200_TextFieldInit(void)
  19. {
  20.     TextFieldBase = OpenLibrary("gadgets/textfield.gadget", 0);
  21.     if (TextFieldBase) {
  22.         return 0;
  23.     } else {
  24.         return 1;
  25.     }
  26. }
  27.  
  28. void _STD_200_TextFieldTerm(void)
  29. {
  30.     CloseLibrary(TextFieldBase);
  31.     TextFieldBase = NULL;
  32. }
  33.